package com.example.museum.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.museum.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

@Mapper
public interface OrderMapper extends BaseMapper<Orders> {


    @Select("select * from orders where number= #{number}")
    Orders selectBynumber(String number);


    @Select("select sum(total_amount) from orders")
    BigDecimal gettotalSales();

    @Select("Select count(*) from orders")
    Integer gettotalOrders();

}